import request from '@/config/axios'
import type { Dayjs } from 'dayjs';

/** 参会方案信息 */
export interface MeetingPlan {
          id: number; // 主键id
          schemeName: string; // 参会名称
          schemePrice: number; // 方案价格
  }

// 参会方案 API
export const MeetingPlanApi = {
  // 查询参会方案分页
  getMeetingPlanPage: async (params: any) => {
    return await request.get({ url: `/biz/meeting-plan/page`, params })
  },

  // 查询参会方案详情
  getMeetingPlan: async (id: number) => {
    return await request.get({ url: `/biz/meeting-plan/get?id=` + id })
  },

  // 新增参会方案
  createMeetingPlan: async (data: MeetingPlan) => {
    return await request.post({ url: `/biz/meeting-plan/create`, data })
  },

  // 修改参会方案
  updateMeetingPlan: async (data: MeetingPlan) => {
    return await request.put({ url: `/biz/meeting-plan/update`, data })
  },

  // 删除参会方案
  deleteMeetingPlan: async (id: number) => {
    return await request.delete({ url: `/biz/meeting-plan/delete?id=` + id })
  },

  /** 批量删除参会方案 */
  deleteMeetingPlanList: async (ids: number[]) => {
    return await request.delete({ url: `/biz/meeting-plan/delete-list?ids=${ids.join(',')}` })
  },

  // 导出参会方案 Excel
  exportMeetingPlan: async (params) => {
    return await request.download({ url: `/biz/meeting-plan/export-excel`, params })
  },
}